package com.kevinwu.sqlSession;

import com.kevinwu.pojo.Configuation;

public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuation configuation;

    public DefaultSqlSessionFactory(Configuation configuation) {
        this.configuation = configuation;
    }

    /**
     * 生产一个sqlSession
     * @return
     */
    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuation);
    }
}
